package com.goods.business.controller;

import com.goods.business.pojo.BizHealth;
import com.goods.business.pojo.OutStock;
import com.goods.business.service.OutStockService;
import com.goods.common.error.SystemException;
import com.goods.common.vo.business.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RestController
public class OutStockController {
    @Autowired
    OutStockService outStockService;

    public List<OutStockVO> findOutStockList(Integer pageNum, Integer pageSize, Integer status,String outNum,Integer type) {
        return outStockService.findOutStockList(pageNum, pageSize, status,outNum,type);
    }

    public OutStockDetailVO seloutStockdetailById(Integer pageNum, Integer id) {
        return outStockService.seloutStockdetailById(pageNum,id);
    }

    public BizHealth health(String name) {
        return outStockService.health(name);
    }

    public Date healthReport(String name, BizHealth bizHealth) {
         return outStockService.healthReport(name,bizHealth);
    }

    public List<BizHealth> selhealthHistoryall(String admin, Integer pageNum, Integer pageSize) throws SystemException {
        return outStockService.selhealthHistoryall(admin,pageNum,pageSize);
    }


    public void OutStockAddOutStock(OutStockVO outStockVO) throws SystemException {
        outStockService.OutStockAddOutStock(outStockVO);
    }

}
